#!/bin/sh
TFILE="/media/testdrive/result.txt"

#Esperamos hasta que se haya completado el arranque
while ! test -f /var/run/runlevel; do
	sleep 1
done

echo "----- STARTING TEST -----"
echo " EXECUTING TEST IN `pwd`" > $TFILE

ifconfig >> $TFILE

if ping 10.0.2.15 -c 2; then
	echo "OK" >> $TFILE
else
	echo "FAILED" >> $TFILE
fi
reboot
